/*
 * Copyright (c) 2024 AlgoIdeas <yu19881234@163.com>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef MQTT_CONFIG
#define MQTT_CONFIG

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>

#ifdef __cplusplus
extern "C" {
#endif

#define MQTT_USERNAME       "sas"
#define MQTT_PASSWORD       "sas"
#define MQTT_TOPIC          "sas_topic"
#define MQTT_CLIENT_ID      "sas_client_id"

#define MQTT_HOST           "8.138.172.68"
#define MQTT_PORT           1883

typedef enum IRRIGATE_TYPE {
    IRRIGATE_HEARTBEAT,
    IRRIGATE_DATA,
    IRRIGATE_IMMEDIATELY,
    IRRIGATE_INTERVAL,
    IRRIGATE_THRESHOLD,  /* unit: ML*/
    IRRIGATE_STOP,
} IRRIGATE_TYPE_T;

struct IrrigateTypeName {
    IRRIGATE_TYPE_T type;
    const char *name;
};

#ifdef __cplusplus
}
#endif

#endif /* MQTT_CONFIG */